<template>
  
  <router-view/>
  
</template>

<script>

export default {
    created: function() {
      if (window.localStorage.getItem("list") ) {
          this.$store.replaceState(Object.assign({}, this.$store.state,JSON.parse(window.localStorage.getItem("list"))));
      }
      window.addEventListener("beforeunload",()=>{
          window.localStorage.setItem("list",JSON.stringify(this.$store.state))
      })
    }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
</style>
